import java.util.ArrayList;
public class SimpleDotComGame {

  public static void main(String[]args){
    int numOfGuesses = 0;
    GameHelper helper = new GameHelper();
    SimpleDotCom theDotCom = new SimpleDotCom();
    int randomNum = (int) (Math.random() * 5);
    ArrayList<String> locations = new ArrayList<String>();
    String[] locs = {Integer.toString(randomNum), Integer.toString(randomNum + 1), Integer.toString(randomNum + 2)};
    for(String s: locs){
    locations.add(s);
    }
    theDotCom.setLocationCells(locations);
    boolean isAlive = true;

    while (isAlive){
      String guess = helper.getUserInput("enter a number");
      String result = theDotCom.checkYourself(guess);
      numOfGuesses++;
      if (result.equals("kill")){
        isAlive = false;
        System.out.println("You took " + numOfGuesses + " guesses");
      }
    }
  }

}
